<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<html>
<head>
    <title>国家信息</title>
</head>

<body>
    <form style="text-align: center" action="${pageContext.request.contextPath}/findAllCate.do">
        <input type="text" name="name" value="">
        <input type="submit" value="搜索">
    </form>
    <table class="table table-bordered">
    <tbody>
    <p align="right" style="margin-right: 30%"><a href="${pageContext.request.contextPath}/addAll.do">添加</a></p>
    <tr>
        <td>id</td>
        <td>code</td>
        <td>name</td>
        <td>region</td>
        <td>surfaceArea</td>
        <td>indepYrea</td>
        <td>population</td>
        <td>lifeExpectancy</td>
        <td>gnp</td>
        <td>headOfState</td>
        <td>capital</td>
        <td>code2</td>
        <td>function</td>
    </tr>
    </tbody>
    <c:forEach items="${countrys}" var="item" varStatus="vs">
        <tr>
            <td>${vs.count}</td>
            <td>${item.code}</td>
            <td>${item.name}</td>
            <td>${item.region}</td>
            <td>${item.surfaceArea}</td>
            <td>${item.indepYrea}</td>
            <td>${item.population}</td>
            <td>${item.lifeExpectancy}</td>
            <td>${item.gnp}</td>
            <td>${item.headOfState}</td>
            <td>${item.capital}</td>
            <td>${item.code2}</td>
            <td><a href="${pageContext.request.contextPath}/edit.do?name=${item.name}">修改</a>
                <a onclick="return confirm('确认删除吗')" href="${pageContext.request.contextPath}/deleteCountry.do?name=${item.name}">删除</a></td>

        </tr>
    </c:forEach>

</table>
</body>
</html>
